
load('summary_data/figA1.rda')

cols = c("CES Owner %" = "black", "2/3 Target" = 'grey', "L2-CL Match %" = "red")

out = ggplot(ces, aes(x = reorder(state, -ownhome), ownhome, color = 'CES Owner %')) + geom_point() +
  geom_linerange(aes(ymin = ownhome - 1.96 * se, ymax = ownhome + 1.96 *
                       se)) +
  geom_point(aes(y = 2 * ownhome / 3, color = '2/3 Target')) +
  geom_linerange(aes(
    ymin = (2 / 3) * ownhome - 1.96 * se,
    ymax = (2 / 3) * ownhome + 1.96 * se,
    color = '2/3 Target'
  )) +
  geom_point(aes(y = implied_own_rate, color = 'L2-CL Match %')) +
  theme_light() +
  scale_y_continuous(labels = scales::label_percent(), limits = c(0, 1)) +
  labs(x = 'State', y = 'Percentage') +
  theme(axis.text.x = element_text(size = 6)) +
  scale_colour_manual(values = cols, name = NULL) +
  theme(text = element_text(face = 'bold')) +
  theme(legend.position = 'right', legend.margin = margin(c(5, 5, 5, -5)))

ggsave(filename = 'figures/figA1.pdf', plot = out, width = 10, height = 5, units = 'in')
